import Ember from 'ember';
let rate=280/210;
export default Ember.Component.extend({
  didInsertElement: function () {
    // 图片长款自适应
    $(".image-container").each(function () {
      $(this).height($(this).width() * rate);
      var $img = $(this).find("img");
      var imgWidth = $img.width();
      var differ = $(this).width() - imgWidth;
      if (differ < 0) {
        $img.css("margin-left", differ / 2);
      }

    });
  }
});
